home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Questions on Object-Oriented Programming?
- Date: 31 Mar 1996 10:14:43 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4jmi2jINN7c0@keats.ugrad.cs.ubc.ca>
- References: <315d97ad.4471232@shts.seed.net.tw>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <315d97ad.4471232@shts.seed.net.tw>,
- Jason Lam <lamj@icacomp.com> wrote:
- >Hello!!
- >
- >I got the following questions on Object Oriented Programming:
- >
- >What is a 'class' and an 'instance' of an object. Any examples?
- >what is the state and behavior of an object each refer to.
-
- These are abstract concepts. I'm writing (or I _should_ be writing, rather) an
- essay in philosophy of science about an object-oriented conception of
- scientific theories. Concepts of 'class', 'instance', 'state' and 'behavior'
- are attributed to theoretical entities such as 'electron', rather than to
- software program entities.
-
- Clearly, the ideas extend past programming. An apple is an instance of the
- abstract class of apples---that is, sort of a ``physical embodiment'' of the
- abstract idea of an apple. I can talk about the properties of objects of the
- class of apples without having an instance in my hand. A class is like a
- category, and an instance is an actual member of that category.
-
- >What is a method?
-
- >What is a 'message' is. Any example?
-
- A way for objects to interact, to tell each other what to do in essence. In
- programming, messages are often implemented as function calls to methods within
- an object. For example, the flashlight object may have a method called
- "turnon", i.e. a built in function that causes the flashlight to come on when I
- call it. I can look at it as invoking the method---that portion of the object
- that governs specific behavior with respect to turning on the light---or more
- abstractly I can look at it as passing the flashlight a message to turn itself
- on.
-
- The concepts overlap and easly become more muddy the more you think about
- them---like the thought processes of an OO programmer or a philosopher alike.
- This is a where we discuss straightforward ways of achieving productive
- computation in the C language.
-
- >What two states can the button object "OPEN" in the Netscape toolbar
- >be in?
-
- Smells like homework!
- --
-
-